/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jfonia.commands;

import org.jfonia.view.scribbles.Scribble;
import org.jfonia.view.scribbles.Scribbles;

/**
 *
 * @author Rik Bauwens
 */
public class AddScribbleCommand extends Command
{
        private Scribbles scribbles;
        private Scribble scribble;

        public AddScribbleCommand(Scribbles scribbles, Scribble scribble)
        {
                super();
                this.scribbles = scribbles;
                this.scribble = scribble;
        }

        @Override
        protected void execute()
        {
                scribbles.addScribble(scribble);
        }

        @Override
        protected void undo()
        {
                scribbles.removeScribble(scribble);
        }
}
